package com.foreverwin.mes.common.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author syngna123
 * @since 2018-11-15
 */
@TableName("Z_KEY_LOCK")
public class KeyLock extends Model<KeyLock> {

    private static final long serialVersionUID = 1L;

   @TableId(value = "HANDLE", type = IdType.INPUT)
   private String handle;

   @TableField("OBJ_REF")
   private String objRef;


   public String getHandle() {
      return handle;
   }

   public void setHandle(String handle) {
      this.handle = handle;
   }

   public static long getSerialVersionUID() {
      return serialVersionUID;
   }

   public String getObjRef() {
      return objRef;
   }

   public void setObjRef(String objRef) {
      this.objRef = objRef;
   }

   public static final String HANDLE = "HANDLE";

   @Override
   protected Serializable pkVal() {
      return this.handle;
   }

   @Override
   public String toString() {
      return "KeyLock{" +
         "handle = " + handle +
              ",objRef = " + objRef +
         "}";
   }
}